﻿using Autofac;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

namespace Dapper_Core.Web
{
    public class BusinessModule : Autofac.Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            //暴露接口
            builder.RegisterAssemblyTypes(Assembly.Load("Dapper_Core.BLL.Impl"))
                .Where(a => { return a.Name.EndsWith("Business"); })
                .AsImplementedInterfaces();
        }
    }
}
